package org.jeecg.modules.online.entity;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.jeecgframework.poi.excel.annotation.Excel;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 图表配置
 */
@Data
@Entity
@Table(name = "CS_DIAGRAM_CONFIG")
@TableName("CS_DIAGRAM_CONFIG")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "图表配置对象", description = "图表配置")
public class DiagramConfiguration extends BaseEntity implements Serializable,Cloneable {

	private static final long serialVersionUID = -8301271214331501163L;

	@Excel(name = "图表名称", width = 15)
	@ApiModelProperty(value = "图表名称")
	@Column(name = "NAME")
	private String name;// "月度增长分析同比"

	@Excel(name = "编码", width = 15)
	@ApiModelProperty(value = "编码")
	@Column(name = "CODE")
	private String code;// "monthly_growth_analysis"

	@Excel(name = "显示模板", width = 15)
	@ApiModelProperty(value = "显示模板")
	@Column(name = "DISPLAY_TEMPLATE")
	private String displayTemplate;// "double"

	@Excel(name = "X轴字段", width = 15)
	@ApiModelProperty(value = "X轴字段")
	@Column(name = "X_AXIS_FIELD")
	@TableField(value = "X_AXIS_FIELD")
	private String xaxisField;// "month"

	@Excel(name = "Y轴字段", width = 15)
	@ApiModelProperty(value = "Y轴字段")
	@Column(name = "Y_AXIS_FIELD")
	@TableField(value = "Y_AXIS_FIELD")
	private String yaxisField; // "2018年月总收入,2019年月总收入"

	@Excel(name = "数据类型", width = 15)
	@ApiModelProperty(value = "数据类型")
	@Column(name = "DATA_TYPE")
	private String dataType;// "sql"

	@Excel(name = "图表类型", width = 15)
	@ApiModelProperty(value = "图表类型")
	@Column(name = "GRAPH_TYPE")
	private String graphType;// "table,line,bar"

	@Excel(name = "描述", width = 15)
	@ApiModelProperty(value = "描述")
	@Column(name = "CONTENT")
	private String content;// null

	@Excel(name = "查询SQL", width = 15)
	@ApiModelProperty(value = "查询SQL")
	@Column(name = "CGR_SQL", length = 5000)
	private String cgrSql;// select * from dual

	@Excel(name = "JS增强", width = 15)
	@ApiModelProperty(value = "JS增强")
	@Column(name = "EXTEND_JS")
	private String extendJs;// null

	@Excel(name = "JS增强", width = 15)
	@ApiModelProperty(value = "JS增强")
	@Column(name = "IS_COMBINATION")
	private String isCombination;// "combination"

	@Excel(name = "Y轴文字", width = 15)
	@ApiModelProperty(value = "Y轴文字")
	@Column(name = "Y_AXIS_TEXT")
	@TableField(value = "Y_AXIS_TEXT")
	private String yaxisText;// "-"
	
	@Transient
	@TableField(exist = false)
	private List<DiagramFieldConfiguration> diagramFieldConfigurationList;
	
	@Override
    public Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

}
